// 使用代理拦截动态属性
export const createProxy = (value) => {
  const handler = () => value;
  return new Proxy(
    {},
    {
      get(target, prop) {
        if (prop === Symbol.toPrimitive) {
          return handler;
        }
        return target[prop];
      },
    }
  );
};
